package com.mantru.iotpot.dao;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Environment;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * 菜谱管理表--步骤表--主配菜表
 * 作者： cmh
 * 日期： 2022/12/19
 */

public class t_vegetable_info_steep_vegetable
{
    public String table_name = "t_vegetable_info_steep_vegetable";
    public String sub_id,steep_id,vegetable_id,sub_type,sub_name,sub_value,update_time;
    public String create_sql = "create table t_vegetable_info_steep_vegetable(sub_id integer primary key, steep_id integer, vegetable_id integer, sub_type integer, sub_name text, sub_value integer, update_time text)";
    public String drop_sql = "drop table t_vegetable_info_steep_vegetable";
    public String entity_sql = "select * from t_vegetable_info_steep_vegetable where vegetable_id=? and steep_id=? and sub_id=?";
    public String list_sql = "select * from t_vegetable_info_steep_vegetable where vegetable_id=? and steep_id=? order by sub_id";
    public String max_sql = "select ifnull(max(sub_id),0) as sub_id from t_vegetable_info_steep_vegetable";
    public String clear_sql = "delete from t_vegetable_info_steep_vegetable where vegetable_id=?";

    public String[] GetEntityValues()
    {
        String[] values = new String[3];
        values[0] = vegetable_id;
        values[1] = steep_id;
        values[2] = sub_id;
        return values;
    }

    public String[] GetClearValues()
    {
        String[] values = new String[1];
        values[0] = vegetable_id;
        return values;
    }

    public String[] GetMaxValues()
    {
        String[] values = new String[1];
        values[0] = vegetable_id;
        return values;
    }

    public ContentValues GetInsertContentValues()
    {
        ContentValues cv = new ContentValues();
        cv.put("sub_id", sub_id);
        cv.put("steep_id", steep_id);
        cv.put("vegetable_id", vegetable_id);
        cv.put("sub_type", sub_type);
        cv.put("sub_name", sub_name);
        cv.put("sub_value", sub_value);
        cv.put("update_time", update_time);
        return cv;
    }
}
